package org.facyt.commons.view.errors;

import com.vaadin.terminal.ErrorMessage;
import com.vaadin.terminal.Terminal.ErrorEvent;

public class CustomErrorHandler implements ErrorHandler{

	@Override
	public void error(ErrorEvent error) {
		System.out.println(error.getThrowable().toString());
		
	}

	@Override
	public boolean isHandler(ErrorEvent error) {
		Throwable throwable = error.getThrowable();
		return !(throwable instanceof ErrorMessage);
	}

}
